﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewImages.ascx.cs" Inherits="UserControl_NewImages" %>
<div id="id_portal_imgNews" class="pp_portal_imgNews">
    <div id="id_portal_imgNew1" class="pp_portal_imgNew">
        <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1">
            <ItemTemplate>
                <asp:HyperLink ID="first2" runat="server" NavigateUrl='<%# "../News.aspx?newsId=" + (string)Eval("Id") %>'>
                    <asp:Image ID="Image" runat="server" ImageUrl='<%# "../images/" + (string)Eval("ImageUrl") %>'
                        AlternateText='<%# (string)Eval("ImageAltText")%>' Width="270" Height="199" /></asp:HyperLink><br />
                <br />
            </ItemTemplate>
        </asp:FormView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnectionString %>"
            SelectCommand="select top 1 id,title,imageurl,imageAltText from news order by date desc">
        </asp:SqlDataSource>
    </div>
    <div id="id_portal_imgNew2" class="pp_portal_imgNew" style="display: none;">
        <asp:FormView ID="FormView2" runat="server" DataSourceID="SqlDataSource2">
            <ItemTemplate>
                <asp:HyperLink ID="second2" runat="server" NavigateUrl='<%# "../News.aspx?newsId=" + (string)Eval("Id") %>'>
                    <asp:Image ID="Image" runat="server" ImageUrl='<%# "../images/" + (string)Eval("ImageUrl") %>'
                        AlternateText='<%# (string)Eval("ImageAltText")%>' Width="270" Height="199" /></asp:HyperLink>
            </ItemTemplate>
        </asp:FormView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnectionString %>"
            SelectCommand="select top 1 id,title,imageurl,imageAltText from news where date not in (select top 1 date from news order by date desc)">
        </asp:SqlDataSource>
    </div>
    <div id="id_portal_imgNew3" class="pp_portal_imgNew" style="display: none;">
        <asp:FormView ID="FormView3" runat="server" DataSourceID="SqlDataSource3">
            <ItemTemplate>
                <asp:HyperLink ID="third2" runat="server" NavigateUrl='<%# "../News.aspx?newsId=" + (string)Eval("Id") %>'>
                    <asp:Image ID="Image" runat="server" ImageUrl='<%# "../images/" + (string)Eval("ImageUrl") %>'
                        AlternateText='<%# (string)Eval("ImageAltText")%>' Width="270" Height="199" /></asp:HyperLink>
            </ItemTemplate>
        </asp:FormView>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnectionString %>"
            SelectCommand="select top 1 id,title,imageurl,imageAltText from news where date not in (select top 2 date from news order by date desc)">
        </asp:SqlDataSource>
    </div>
    <div id="id_portal_imgNew4" class="pp_portal_imgNew" style="display: none;">
        <asp:FormView ID="FormView4" runat="server" DataSourceID="SqlDataSource4">
            <ItemTemplate>
                <asp:HyperLink ID="fourth2" runat="server" NavigateUrl='<%# "../News.aspx?newsId=" + (string)Eval("Id") %>'>
                    <asp:Image ID="Image" runat="server" ImageUrl='<%# "../images/" + (string)Eval("ImageUrl") %>'
                        AlternateText='<%# (string)Eval("ImageAltText")%>' Width="270" Height="199" /></asp:HyperLink>
            </ItemTemplate>
        </asp:FormView>
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnectionString %>"
            SelectCommand="select top 1 id,title,imageurl,imageAltText from news where date not in (select top 1 date from news order by date desc)">
        </asp:SqlDataSource>
    </div>
    <div id="id_portal_navLinks" class="pp_portal_navLink">
        <ul>
            <li id="id_portal_navLink1"><a href="javascript:void(0)" onclick="pp_portal_selectPicNew(1)">
                1 </a></li>
            <li id="id_portal_navLink2"><a href="javascript:void(0)" onclick="pp_portal_selectPicNew(2)">
                2 </a></li>
            <li id="id_portal_navLink3"><a href="javascript:void(0)" onclick="pp_portal_selectPicNew(3)">
                3 </a></li>
            <li id="id_portal_navLink4"><a href="javascript:void(0)s" onclick="pp_portal_selectPicNew(4)">
                4 </a></li>
        </ul>
    </div>
</div>
